package com.example.gulimall.common.perporties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>@description: 全集参数  </p>
 * <p>@author: JGD </p>
 * <p>@create: 2020/3/17 16:57 </p>
 * <p>@version : 2.0.0
 **/
@Setter
@Getter
@Configuration
@ConfigurationProperties(prefix = "base.security")
public class SecurityProperties {
    /**
     *  账号密码登录
     */
    private String loginUri = SecurityConstants.LOGIN_URI;
    /**
     * 手机号登录
     */
    private String loginByMobileUri = SecurityConstants.LOGIN_URI_MOBILE;
    /**
     * 手机号登录参数
     */
    private String loginByMobileParameterName = SecurityConstants.DEFAULT_PARAMETER_NAME_MOBILE;
    /**
     * 放行接口
     */
    private List<String> allowedUri = new ArrayList<>();
    /**
     * clientId
     */
    private String clientId = "client";
    /**
     * secret
     */
    private String secret = "$2a$10$CMW0n1bODZDkcrOkTsTOK.GBxoXE.0Q.v0emEPNb2i.zP0m/xJVoy";
    /**
     * 针对此应用发出的token的有效时间
     */
    private int accessTokenExpireSecond = SecurityConstants.ACCESS_TOKEN_EXPIRE_SECONDS;
    /**
     * jwt的密匙
     */
    private String jwtSigningKey = SecurityConstants.JWT_SIGNING_KEY;

}
